package com.yyw.bean;

import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "举报Accusation")
public class Accusation {

    @ApiModelProperty("举报ID")
    private Long id;

    @ApiModelProperty("用户ID")
    private Long userid;

    @ApiModelProperty("举报类型")
    private Integer type;

    @ApiModelProperty("举报物ID")
    private Long aid;

    @ApiModelProperty("举报内容")
    private String content;

    @ApiModelProperty("状态")
    private Integer state;

    @ApiModelProperty("创建时间")
    private Date createtime;

    // *****************
    @ApiModelProperty("被举报次数")
    private Integer sum;

    public boolean check() {
        if (userid == null) {
            return false;
        }
        if (type == null || type < 1 || type > 3) {
            return false;
        }

        if (content == null) {
            return false;
        }
        if (aid == null) {
            return false;
        }
        return true;
    }

}
